package kernel_gui.interfaces.kernel_gui;

import common.entities.enums.ACTION;
import common.entities.persistent.Country;
import common.entities.persistent.Movie;

/**
 * @author Yoyo
 *
 */
public interface IManageCountry {

	/**
	 * delete/update/create country
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with Boolean value 'true'
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param country
	 */
	void actionCountry(ACTION action, Country country, int requestID);

	
	/**
	 * Counts how many country records in the DB match wanted query
	 * 
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with Integer value holding number of records
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param countrySubStr -  null if not used, a string otherwise
	 */
	void countCountries(String countrySubStr,Movie movie, int requestID);
	
	/**
	 * Gets the set of countries from DB that match wanted query ordered by country name
	 * <br><br>
	 * <b>On Success</b> - will call gui's returnAnswer with List<Country> that match wanted query  (no matches is counted as success - empty list)
	 * <br>
	 * <b>On fail</b> - will call gui's returnError with the right error message
	 * <br>
	 * @param countrySubStr -  null if not used, a string otherwise
	 * @param from - starting from 0, 
	 * @param to - not including! (the item at 'to' index);
	 */
	void getCountries(String countrySubStr, int from, int to, int requestID);
	
}
